{extend name="public/base" /}

{block name="title"}<title>{:lang('edit')}</title>{/block}

{block name="pjax_container"}
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <form class="form-horizontal" method="POST" action="{:url('Config/save')}" onsubmit="return false" >
                <div class="nav-tabs-custom">
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#tab1" data-toggle="tab">{:lang('base_param')}</a></li>
                        <li><a href="#tab2" data-toggle="tab">{:lang('help')}</a></li>
                    </ul>
                    <div class="tab-content">
                        <div class="tab-pane active" id="tab1">
                            {:widget('common/Hidden/index', [$type, [
                                'name' => 'type',
                            ]])}
                            {volist name="data" id="vo"}
                            {:widget('common/'.$vo->texttype.'/index', [$vo, [
                                'name' => $vo->k,
                                'title' => $vo->infos,
                                'placeholder' => $vo->infos,
                                'validate' => $vo->prompt,
                                'from' => 'selectlist',
                                'fromcfg' => $vo->textvalue,
                            ]])}
                            {/volist}
                        </div>
                        <div class="tab-pane" id="tab2">
                            <div class="callout callout-danger">
                                <p>特别注意：</p>
                                <p>1、值不能包含英文的单引号，“'”，否则会导致生成配置文件错误，导致程序错误</p>
                                <p>2、如果需要填写PHP数组请分别以“[”和“]”开始和结束，不能单独以“[”开始，否则会导致生成配置文件错误，导致程序错误</p>
                                <p>如果不慎保存，请手动修复dbconfig.php配置文件或清空并重新保存</p>
                            </div>
                        </div>
                    </div>
                    <div class="box-footer">
                        <div class="col-sm-2"></div>
                        <div class="col-sm-6">
                            <div class="btn-group">
                                {:auth_action(CONTROLLER_NAME.'/save', 'submit', lang('submit'), '', 'info', '')}
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</section>
{/block}